package com.xiaolin.spring.xml;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * @ClassName CollectionsTest
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/10/27
 * @Version 1.0
 */
public class CollectionsTest {
    public void setList(List list) {
        this.list = list;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public void setSet(Set<Integer> set) {
        this.set = set;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    private List list;
    private Map<String,String> map;
    private Set<Integer> set;
    private Properties properties;

    public static void main(String[] args) {
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("collections.xml");
        CollectionsTest co = applicationContext.getBean("co", CollectionsTest.class);
        System.out.println(co.list);
        System.out.println(co.map.get("a"));
        System.out.println(co.set.isEmpty());
        System.out.println(co.properties.getProperty("hello"));
    }
}
